import 'package:flutter/material.dart';

class ConversationModel {
  ConversationModel(
      {@required this.title,
      @required this.avatar,
      this.titleColor,
      this.lastMessage,
      @required this.createTime,
      this.open: false,
      this.displayDot: true})
      : assert(avatar != null),
        assert(title != null),
        assert(createTime != null);

  String avatar;
  String title;
  String lastMessage;
  String createTime;
  bool open;
  int titleColor;
  String newMessage;
  bool displayDot;

  isNetAvatar(){
    return (this.avatar.startsWith('http')||this.avatar.startsWith('https'));
  }
  
}

List<ConversationModel> mu = [
  ConversationModel(
      avatar: 'assets/images/1.jpg',
      title: '测试1',
      lastMessage: 'adsfasdfasdfasd',
      createTime: '19:00'),
  ConversationModel(
      avatar: 'assets/images/2.jpg',
      title: '测试2',
      lastMessage: 'adsfasdfasdfasd',
      createTime: '昨天 10:00'),
  ConversationModel(
      avatar: 'https://randomuser.me/api/portraits/women/23.jpg',
      title: '测试3',
      lastMessage: 'adsfasdfasdfasd',
      createTime: '昨天'),
  ConversationModel(
      avatar: 'https://randomuser.me/api/portraits/women/19.jpg',
      title: '测试4',
      lastMessage: 'adsfasdfasdfasd',
      createTime: '昨天'),
  ConversationModel(
      avatar: 'https://randomuser.me/api/portraits/women/12.jpg',
      title: '测试5',
      lastMessage: 'adsfasdfasdfasd',
      createTime: '昨天'),
  ConversationModel(
      avatar: 'https://randomuser.me/api/portraits/women/10.jpg',
      title: '测试6',
      lastMessage: 'adsfasdfasdfasd',
      createTime: '昨天'),
  ConversationModel(
      avatar: 'https://randomuser.me/api/portraits/women/22.jpg',
      title: '测试7',
      lastMessage: 'adsfasdfasdfasd',
      createTime: '昨天'),
  ConversationModel(
      avatar: 'https://randomuser.me/api/portraits/women/22.jpg',
      title: '测试7',
      lastMessage: 'adsfasdfasdfasd',
      createTime: '昨天'),
  ConversationModel(
      avatar: 'https://randomuser.me/api/portraits/women/22.jpg',
      title: '测试7',
      lastMessage: 'adsfasdfasdfasd',
      createTime: '昨天'),
  ConversationModel(
      avatar: 'https://randomuser.me/api/portraits/women/22.jpg',
      title: '测试7',
      lastMessage: 'adsfasdfasdfasd',
      createTime: '昨天'),
  ConversationModel(
      avatar: 'https://randomuser.me/api/portraits/women/22.jpg',
      title: '测试7',
      lastMessage: 'adsfasdfasdfasd',
      createTime: '昨天'),
  ConversationModel(
      avatar: 'https://randomuser.me/api/portraits/women/22.jpg',
      title: '测试7',
      lastMessage: 'adsfasdfasdfasd',
      createTime: '昨天'),
  ConversationModel(
      avatar: 'https://randomuser.me/api/portraits/women/22.jpg',
      title: '测试7',
      lastMessage: 'adsfasdfasdfasd',
      createTime: '昨天'),
  ConversationModel(
      avatar: 'https://randomuser.me/api/portraits/women/22.jpg',
      title: '测试7',
      lastMessage: 'adsfasdfasdfasd',
      createTime: '昨天'),
  ConversationModel(
      avatar: 'https://randomuser.me/api/portraits/women/22.jpg',
      title: '测试7',
      lastMessage: 'adsfasdfasdfasd',
      createTime: '昨天'),
  ConversationModel(
      avatar: 'https://randomuser.me/api/portraits/women/22.jpg',
      title: '测试7',
      lastMessage: 'adsfasdfasdfasd',
      createTime: '昨天'),
  ConversationModel(
      avatar: 'https://randomuser.me/api/portraits/women/22.jpg',
      title: '测试7',
      lastMessage: 'adsfasdfasdfasd',
      createTime: '昨天'),
  ConversationModel(
      avatar: 'https://randomuser.me/api/portraits/women/22.jpg',
      title: '测试7',
      lastMessage: 'adsfasdfasdfasd',
      createTime: '昨天'),
  ConversationModel(
      avatar: 'https://randomuser.me/api/portraits/women/22.jpg',
      title: '测试7',
      lastMessage: 'adsfasdfasdfasd',
      createTime: '昨天'),
  ConversationModel(
      avatar: 'https://randomuser.me/api/portraits/women/22.jpg',
      title: '测试7',
      lastMessage: 'adsfasdfasdfasd',
      createTime: '昨天'),
  ConversationModel(
      avatar: 'https://randomuser.me/api/portraits/women/22.jpg',
      title: '测试7',
      lastMessage: 'adsfasdfasdfasd',
      createTime: '昨天'),
];
